Developer Documentation

QuickTime 4 API Documentation

QuickTime 4 Reference

| Previous | Chapter Contents | Chapter Top | Next |

Adding the Sample to the Media

Once you have the sample description prepared, you can call AddMediaSample to add the effect description to the media. Listing 4 shows an example call.

Listing 4 Calling AddMediaSample to add the effect description

// Always call BeginMediaEdits before adding sample to a media
BeginMediaEdits(theEffectsMedia);

// Add the sample to the media
AddMediaSample(theEffectsMedia,
                (Handle) theEffectDescription,
                0,
                GetHandleSize((Handle) theEffectDescription),
                600,
                (SampleDescriptionHandle) sampleDescription,
                1,
                0,
                &sampleTime);

// End the media editing session
EndMediaEdits(theEffectsMedia);

© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |